

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f0f2f5;
}

#login-page {
    /* 保持原有登录页样式 */
    max-width: 400px;
    margin: 50px auto;
    padding: 2rem;
    text-align: center;
}

/* 主界面布局 */
#main-page {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
}

.system-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-menu li {
    list-style: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.sidebar-menu li:hover {
    background: #34495e;
}

.sidebar-menu li.active {
    background: #3498db;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #34495e;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
}

header {
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 模块内容 */
.module-section {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

.module-section.active {
    display: block;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

/* 搜索框样式 */
.search-box {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.5rem;
}

/* 列表样式 */
#student-list,
#teacher-list,
#course-list {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
}
/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8f9fa;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: #ffffff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.sidebar-menu {
    height: 100%;
    padding: 20px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background: #e9ecef;
    border-radius: 4px;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 270px; /* 250px + 20px边距 */
    padding: 20px;
    background: #ffffff;
    min-height: calc(100vh - 60px);
}

/* 顶部导航样式（如果存在） */
.header {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    padding: 10px 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }
}








/* 基础布局 */
.layout-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    transition: transform 0.3s ease;
    transform: translateX(0);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

/* 修复隐藏问题 */
.menu-list {
    display: block !important;
    height: auto !important;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    transition: background 0.2s ease;
}

.menu-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

/* 正确的悬停效果 */
.menu-item:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.menu-link:hover {
    color: #3498db;
    background: rgba(255,255,255,0.05);
}

/* 解决内容被遮挡问题 */
.content-area {
    margin-left: 270px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-expanded {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
    }
}



.login-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease;


}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.module-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}
#login-page {
    display: block; /* 明确显示类型 */
    position: static; /* 重置定位 */
    max-width: 400px;
    margin: 50px auto;
    padding: 2rem;
    text-align: center;
    background: white; /* 添加背景 */
    border-radius: 8px; /* 添加圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}
/* 确保主页面初始隐藏 */
#main-page {
    display: none; /* 初始隐藏 */
    flex: 1;
    min-height: 100vh;
}
/* 添加隐藏类 */
.hidden {
    display: none !important;
}

/* 确保登录容器正确显示 */
.login-container {
    display: block;
    position: static;
    max-width: 400px;
    margin: 50px auto;
}